import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;

public class CatDogAsylum {
    public ArrayList<Integer> asylum(int[][] ope) {
        // write code here
        Queue<Integer> q1 = new LinkedList<>();
    }
}